package com.gmq.chapter01.interrupt;

/**
 * Created by gmq on 2017/08/10.
 * 1.7.7
 *
 * @version 1.0
 * @since 2017/08/10 10:39
 */
public class SynchronizedRun {

    public static void main(String[] args) {
        try {

            SynchronizedObject object = new SynchronizedObject();
            SynchronizedMyThread myThread = new SynchronizedMyThread(object);

            myThread.start();
            myThread.sleep(200);

            myThread.stop();

            System.out.println(object.getUsername() + " " + object.getPassword());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
